<html>
<head><meta charset="utf-8"><title>features ambiguity · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/features.20ambiguity.html">features ambiguity</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216016746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/features%20ambiguity/near/216016746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/features.20ambiguity.html#216016746">(Nov 08 2020 at 17:34)</a>:</h4>
<p>I have been looking into how features work for purposes of benchmarking PubGrub. And found a brain teaser:</p>
<div class="codehilite" data-code-language="TOML"><pre><span></span><code><span class="k">[dependencies]</span>
<span class="n">serde</span> <span class="o">=</span> <span class="s">"1.0"</span>

<span class="k">[build-dependencies]</span>
<span class="n">serde</span> <span class="o">=</span> <span class="s">"0.9"</span>

<span class="k">[features]</span>
<span class="n">a</span> <span class="o">=</span> <span class="k">["serde/derive"]</span>
</code></pre></div>
<p>witch copy of serde will get the feature <code>derive</code>? It looks like it is the <code>1.0</code> no matter where I put the dep. As it <code>check</code>s even though <code>0.9</code> does not have a <code>derive</code>. And never <code>check</code>s with <code>unstable-testing</code> witch is in <code>0.9</code> but not in <code>1.0</code>.</p>



<a name="216016917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/features%20ambiguity/near/216016917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/features.20ambiguity.html#216016917">(Nov 08 2020 at 17:38)</a>:</h4>
<p>It should be both, maybe I'm a bit confused by the question.  0.9 seems to contain a <code>derive</code> feature: <a href="https://github.com/serde-rs/serde/blob/v0.9.15/serde/Cargo.toml#L20">https://github.com/serde-rs/serde/blob/v0.9.15/serde/Cargo.toml#L20</a></p>



<a name="216017272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/features%20ambiguity/near/216017272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/features.20ambiguity.html#216017272">(Nov 08 2020 at 17:46)</a>:</h4>
<p>Both + my bad testing. Thanks!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>